package com.ruicar.afs.cloud.basic.proceeds.mq.sender;

import com.ruicar.afs.cloud.basic.common.entity.BasicMainInfo;
import com.ruicar.afs.cloud.basic.proceeds.mq.fallback.ArriveSuccessFallBack;
import com.ruicar.afs.cloud.basic.proceeds.mq.fallback.ReceiptHandleCompleteFallBack;
import com.ruicar.afs.cloud.basic.proceeds.mq.fallback.SendContractActiveSuccessFallBack;
import com.ruicar.afs.cloud.basic.proceeds.mq.fallback.SendContractInfoSuccessFallBack;
import com.ruicar.afs.cloud.common.mq.finance.cancel.dto.CancelSuccessDto;
import com.ruicar.afs.cloud.common.mq.finance.cancel.dto.RefundSuccessDto;
import com.ruicar.afs.cloud.common.mq.finance.debit.dto.DebitSuccessDataDto;
import com.ruicar.afs.cloud.common.mq.finance.debit.dto.ReceiptHandleCompletePackageDto;
import com.ruicar.afs.cloud.common.mq.rabbit.anno.send.AfsRabbitMqClient;
import com.ruicar.afs.cloud.common.mq.rabbit.anno.send.AfsRabbitMqSender;
import com.ruicar.afs.cloud.common.mq.rabbit.message.AfsTransEntity;

/**
 * <p>Description: 发送数据到账务服务</p>
 *
 * @author ZC.GUO
 * @version 1.0
 * @date create on 2020-07-01 18:42
 */
@AfsRabbitMqClient
public interface FinanceSender {

    /**
     * 扣款成功发送信息到账务服务
     * @author ZC.GUO
     * @param entity 发送数据封装
     * @return
     */
    @AfsRabbitMqSender(serverAlias = "${com.ruicar.afs.cloud.rabbitQueue.serverAlia}"
            ,exchangeName = "${com.ruicar.afs.cloud.rabbitQueue.exchangeName}"
            ,queueName = "${com.ruicar.afs.cloud.rabbitQueue.queueName.contractBasicToFinance}"
            ,fallBack = ArriveSuccessFallBack.class)
    void sendDebitSuccessDataToFinance(AfsTransEntity<DebitSuccessDataDto> entity );


    /**
     * 收款取消审批通过收据处理完成后发送数据到账务服务
     * @author ZC.GUO
     * @param entity 发送数据封装
     * @return
     */
    @AfsRabbitMqSender(serverAlias = "${com.ruicar.afs.cloud.rabbitQueue.serverAlia}"
            ,exchangeName = "${com.ruicar.afs.cloud.rabbitQueue.exchangeName}"
            ,queueName = "${com.ruicar.afs.cloud.rabbitQueue.queueName.contractBasicToFinance}"
            )
    void sendReceiptCancelDataToFinance(AfsTransEntity<CancelSuccessDto> entity);
    /**
     * 收款退款审批通过收据处理完成后发送数据到账务服务
     * @author ZC.GUO
     * @param entity 发送数据封装
     * @return
     */
    @AfsRabbitMqSender(serverAlias = "${com.ruicar.afs.cloud.rabbitQueue.serverAlia}"
            ,exchangeName = "${com.ruicar.afs.cloud.rabbitQueue.exchangeName}"
            ,queueName = "${com.ruicar.afs.cloud.rabbitQueue.queueName.contractBasicToFinance}"
            )
    void sendReceiptRefundDataToFinance(AfsTransEntity<RefundSuccessDto> entity);
    /**
     * 收据处理完成发送数据到账务服务
     * @author ZC.GUO
     * @param entity 发送数据封装
     * @return
     */
    @AfsRabbitMqSender(serverAlias = "${com.ruicar.afs.cloud.rabbitQueue.serverAlia}"
            ,exchangeName = "${com.ruicar.afs.cloud.rabbitQueue.exchangeName}"
            ,queueName = "${com.ruicar.afs.cloud.rabbitQueue.queueName.contractBasicToFinance}"
            ,fallBack = ReceiptHandleCompleteFallBack.class)
    void sendReceiptHandleCompleteDataToFinance(AfsTransEntity<ReceiptHandleCompletePackageDto> entity);

    /**合同激活后发送合同数据到进件
     * @author happysayhello
     * @param entity
     */
    @AfsRabbitMqSender(serverAlias = "${com.ruicar.afs.cloud.rabbitQueue.serverAlia}"
            ,exchangeName = "${com.ruicar.afs.cloud.rabbitQueue.exchangeName}"
            ,queueName = "${com.ruicar.afs.cloud.rabbitQueue.queueName.contractBasicToApply}"
            ,fallBack = SendContractActiveSuccessFallBack.class)
    void sendContractActiveToApply(AfsTransEntity<BasicMainInfo> entity);

    /**
     * 日结推送数据
     * @param entity 发送数据封装
     * @return
     */
/*    @AfsRabbitMqSender(serverAlias = "${com.ruicar.afs.cloud.rabbitQueue.serverAlia}"
            ,exchangeName = "${com.ruicar.afs.cloud.rabbitQueue.exchangeName}"
            ,queueName = "${com.ruicar.afs.cloud.rabbitQueue.queueName.voucherContractBasicToFinance}"
            ,fallBack = SendVoucherSuccessFallBack.class)
    void sendVoucherSuccessDataToFinance(AfsTransEntity<VoucherSuccessDataDto> entity );*/

}
